package org.neuedu.chapter06_0621.demo01;

public class MethodDemo01 {
    String name;
    int age;
    boolean gender;
    public MethodDemo01() {}
    public MethodDemo01(String n,int a,boolean g) {
        name = n;
        age = a;
        gender = g;
    }
    public static void test(int num) {
        System.out.println(num);
    }
    public static int test(){
        return 300;
    }

    public static void main(String[] args) {
        test(100);
        MethodDemo01 test = new MethodDemo01();
        test.name = "zhangsan";
        test.age = 22;
        test.gender = false;
        System.out.println(test); // 全限定名@哈希值
        System.out.println(test.name);

        MethodDemo01 test2 = new MethodDemo01("lisi", 23, true);
        System.out.println(test2);// 全限定名@哈希值
        System.out.println(test2.name);
    }
}
